feat(core,app-shell): action params honor a 'visible' predicate; hide create-user phone when plugin off#2406
Merged
Merged
Conversation
…de create-user phone when plugin off ActionParamDef gains an optional visible predicate (same scope as action visible: features/user/app/data). ActionParamDialog evaluates it and omits params that resolve false — in render, validation, and value reset. Paired with the framework change gating create_user.phoneNumber on features.phoneNumber, the form no longer offers a phone field the default backend rejects. filterVisibleParams extracted + exported; 5 unit tests (no-predicate keep, feature-off hide, feature-on show, absent-flag hide, malformed fail-open). Browser-verified: the create_user dialog renders all params with no regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…receives from the spec
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
added a commit
that referenced
this pull request
Jul 13, 2026
…solveActionParams (#2419) The create-user phone fix (#2406) gated the phoneNumber param with visible: 'features.phoneNumber == true', but resolveActionParam dropped visible when flattening raw spec params into ActionParamDef — so ActionParamDialog's filterVisibleParams never saw the predicate and the phone field kept rendering even with the phoneNumber auth plugin off. Propagate visible in all three resolve branches (inline / field-backed / missing-field), unwrapping the spec's { dialect, source } ExpressionInput envelope to a plain CEL string. Adds RawActionParam.visible + a resolver test. Completes the create-user phone fix end to end. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Action params can now carry a
visibleCEL predicate; the param dialog omits a param when it evaluates false. This makes the create-user form follow the plugin: the framework gates thephoneNumberparam onfeatures.phoneNumber, so the form no longer offers a Phone Number field the default backend rejects (Phone numbers require the phoneNumber auth plugin).How
ActionParamDef(@object-ui/core) gains an optionalvisible?: string.ActionParamDialogevaluates each param'svisibleagainst the expression scope (usePredicateScope()→features/user/app/data) viaExpressionEvaluatorand filters — in render, validation, and value reset.filterVisibleParamsis extracted + exported (pure). A param with no predicate is always kept; a predicate that throws defaults to visible (mirrors the ExpressionProvider "config not loaded → visible" contract). The evaluator transparently unwraps the normalized{dialect,source}form the spec serializes to.Verified
ActionParamDialog.test.tsx): no-predicate keeps;features.phoneNumberfalse hides / true shows; absent flag hides (conservative); malformed predicate fails open; and the normalized{dialect,source}served form.create_userdialog opens and renders all 6 params with no regression. (Phone still shows against the current:3000backend because it lacks the paired framework predicate; once that lands,features.phoneNumber == falsehides it — the unit tests prove the filter.)Pairs with
framework objectstack-ai/framework#2871 — adds
visibletoActionParamSchemaand gatessys_user.create_user.phoneNumberonfeatures.phoneNumber. Both must land for the phone field to hide (spec adds the field; this honors it).Answering "why didn't earlier testing catch this"
The prior Users-CRUD pass exercised the email happy-path (which succeeds); it never entered a phone number, so the phone-gated-by-opt-in-plugin path was untested — even though the form advertises the field. This adds the field-level coverage.
🤖 Generated with Claude Code